const $http = window.$http

// 获取船舶的摄像头列表
export function getCameraListByShipId(params) {
  return $http.request({
    url: '/platform/camera/getByList',
    params: params
  })
}

// 开启实时视频流
export function startRealtimeVideoStream(data) {
  return $http.request({
    url: '/supervise/stream/start',
    method: 'POST',
    data
  })
}

// 停止实时视频流
export function stopRealtimeVideoStream(data) {
  return $http.request({
    url: '/supervise/stream/stop',
    method: 'POST',
    data
  })
}

// 保持实时视频流
export function keepRealtimeVideoStream(data) {
  return $http.request({
    url: '/supervise/stream/keepBeart',
    method: 'POST',
    data
  })
}

// 批量保持实时视频流
export function keepRealtimeVideoStreamPatch(data) {
  return $http.request({
    url: '/supervise/stream/keepBeartBatch ',
    method: 'POST',
    data
  })
}

// 获取视频验签
export function queryVideoTokenFetch(data) {
  return $http.request({
    url: '/ffmpeg/token/fetch',
    method: 'POST',
    data
  })
}

// 获取监控报警列表
export function getVideoWarnList(params) {
  return $http.request({
    url: '/warnings/warning/getByList',
    params: params
  })
}

// 根据监控报警id获取报警详情
export function getVideoWarnDetail(warnId) {
  return $http.request({
    url: '/warnings/warning/getById',
    params: { id: warnId }
  })
}

// 获取监控报警类型列表
export function getVideoWarnTypes() {
  return $http.request({
    url: '/platform/warning/model/getByList'
  })
}

// 获取被当前账号监管船舶的企业列表
export function getTenantBySupervise(superviseTenantId) {
  return $http.request({
    url: '/supervise/tenant/getTenantBySupervise',
    params: { superviseTenantId }
  })
}
